index.js ➔ remarkTelegraphPlugin   A
last analyzed

Complexity

Conditions 2

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 9
rs 10
c 0
b 0
f 0
cc 2
1
import Tags from './Tags';
2
import Visitor from './Visitor';
3
4
export default function remarkTelegraphPlugin() {
5
    const visitor = new Visitor(Tags);
6
7
    function Compiler(tree) {
8
        return JSON.stringify(visitor.visit(tree));
9
    }
10
11
    Object.assign(this, { Compiler });
12
}
13
14
export {
15
    Visitor,
16
    Tags
17
};
18